home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / Bonus / Plasmatech / ptscp_eval.exe / %MAINDIR% / EvalC3 / UPTImageCombo.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-08-31  |  9.6 KB  |  282 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'UPTImageCombo.pas' rev: 3.00
  6.  
  7. #ifndef UPTImageComboHPP
  8. #define UPTImageComboHPP
  9. #include <Menus.hpp>
  10. #include <StdCtrls.hpp>
  11. #include <Dialogs.hpp>
  12. #include <Forms.hpp>
  13. #include <Controls.hpp>
  14. #include <Graphics.hpp>
  15. #include <Classes.hpp>
  16. #include <SysUtils.hpp>
  17. #include <Messages.hpp>
  18. #include <Windows.hpp>
  19. #include <SysInit.hpp>
  20. #include <System.hpp>
  21.  
  22. //-- user supplied -----------------------------------------------------------
  23.  
  24. namespace Uptimagecombo
  25. {
  26. //-- type declarations -------------------------------------------------------
  27. class DELPHICLASS TPTImageComboItem;
  28. class DELPHICLASS TPTCustomImageCombo;
  29. class DELPHICLASS TPTCustomCombobox;
  30. typedef void __fastcall (__closure *TPTDeleteComboItemEvent)(System::TObject* aSender, void * aItem)
  31.     ;
  32.  
  33. class PASCALIMPLEMENTATION TPTCustomCombobox : public Stdctrls::TCustomComboBox 
  34. {
  35.     typedef Stdctrls::TCustomComboBox inherited;
  36.     
  37. private:
  38.     TPTDeleteComboItemEvent mOnDeleteItemProc;
  39.     Classes::TNotifyEvent mOnCloseUpProc;
  40.     Classes::TNotifyEvent mOnSelEndCancelProc;
  41.     Classes::TNotifyEvent mOnSelEndOkProc;
  42.     void __fastcall SetItemHeight2(int aValue);
  43.     HIDESBASE MESSAGE void __fastcall CNCommand(Messages::TWMCommand &aMsg);
  44.     HIDESBASE MESSAGE void __fastcall WMDeleteItem(Messages::TWMDeleteItem &amsg);
  45.     
  46. protected:
  47.     virtual void __fastcall DeleteItem(void * aItem);
  48.     DYNAMIC void __fastcall CloseUp(void);
  49.     DYNAMIC void __fastcall SelEndCancel(void);
  50.     DYNAMIC void __fastcall SelEndOk(void);
  51.     __property TPTDeleteComboItemEvent OnDeleteItem = {read=mOnDeleteItemProc, write=mOnDeleteItemProc}
  52.         ;
  53.     __property Classes::TNotifyEvent OnCloseUp = {read=mOnCloseUpProc, write=mOnCloseUpProc};
  54.     __property Classes::TNotifyEvent OnSelEndCancel = {read=mOnSelEndCancelProc, write=mOnSelEndCancelProc
  55.         };
  56.     __property Classes::TNotifyEvent OnSelEndOk = {read=mOnSelEndOkProc, write=mOnSelEndOkProc};
  57.     __property ItemHeight  = {write=SetItemHeight2};
  58. public:
  59.     /* TCustomComboBox.Create */ __fastcall virtual TPTCustomCombobox(Classes::TComponent* AOwner) : Stdctrls::
  60.         TCustomComboBox(AOwner) { }
  61.     /* TCustomComboBox.Destroy */ __fastcall virtual ~TPTCustomCombobox(void) { }
  62.     
  63. public:
  64.     /* TWinControl.CreateParented */ __fastcall TPTCustomCombobox(HWND ParentWindow) : Stdctrls::TCustomComboBox(
  65.         ParentWindow) { }
  66.     
  67. };
  68.  
  69. typedef void __fastcall (__closure *TPTDeleteImageComboItemEvent)(System::TObject* aSender, TPTImageComboItem* 
  70.     aItem);
  71.  
  72. typedef void __fastcall (__closure *TPTImageComboGetItemDataEvent)(System::TObject* aSender, TPTImageComboItem* 
  73.     aItem);
  74.  
  75. class PASCALIMPLEMENTATION TPTCustomImageCombo : public Uptimagecombo::TPTCustomCombobox 
  76. {
  77.     typedef Uptimagecombo::TPTCustomCombobox inherited;
  78.     
  79. private:
  80.     bool mAutoSizeHeight;
  81.     Controls::TImageList* mImageList;
  82.     int mIndentPixels;
  83.     TPTDeleteImageComboItemEvent mOnDeleteImageComboItemProc;
  84.     TPTImageComboGetItemDataEvent mOnGetItemDataProc;
  85.     bool mfInWMSetFont;
  86.     TPTImageComboItem* __fastcall GetImageComboItem(int index);
  87.     HIDESBASE MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &aMsg);
  88.     HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &aMsg);
  89.     MESSAGE void __fastcall WMSetFont(Messages::TWMSetFont &aMsg);
  90.     
  91. protected:
  92.     void __fastcall DoAutoSize(HFONT hf);
  93.     DYNAMIC void __fastcall AutoSize(HFONT hf);
  94.     void __fastcall SetIndentPixels(int aValue);
  95.     void __fastcall SetImageList(const Controls::TImageList* aValue);
  96.     virtual void __fastcall CreateParams(Controls::TCreateParams &p);
  97.     virtual void __fastcall CreateWnd(void);
  98.     virtual void __fastcall DestroyWnd(void);
  99.     virtual void __fastcall DrawItem(int aIndex, const Windows::TRect &aRect, Stdctrls::TOwnerDrawState 
  100.         aState);
  101.     virtual void __fastcall Notification(Classes::TComponent* aComponent, Classes::TOperation operation
  102.         );
  103.     virtual void __fastcall DeleteItem(void * aItem);
  104.     virtual void __fastcall GetItemData(TPTImageComboItem* AItem);
  105.     __property Text  = {stored=false};
  106.     __property bool AutoSizeHeight = {read=mAutoSizeHeight, write=mAutoSizeHeight, default=1};
  107.     __property int IndentPixels = {read=mIndentPixels, write=SetIndentPixels, default=12};
  108.     __property Controls::TImageList* ImageList = {read=mImageList, write=SetImageList};
  109.     __property TPTDeleteImageComboItemEvent OnDeleteItem = {read=mOnDeleteImageComboItemProc, write=mOnDeleteImageComboItemProc
  110.         };
  111.     __property TPTImageComboGetItemDataEvent OnGetItemData = {read=mOnGetItemDataProc, write=mOnGetItemDataProc
  112.         };
  113.     
  114. public:
  115.     __fastcall virtual TPTCustomImageCombo(Classes::TComponent* aOwner);
  116.     __fastcall virtual ~TPTCustomImageCombo(void);
  117.     virtual TPTImageComboItem* __fastcall AddItem(System::AnsiString aCaption, int aImageIndex, int aIndent
  118.         );
  119.     __property TPTImageComboItem* ImageComboItem[int index] = {read=GetImageComboItem};
  120. public:
  121.     /* TWinControl.CreateParented */ __fastcall TPTCustomImageCombo(HWND ParentWindow) : Uptimagecombo::
  122.         TPTCustomCombobox(ParentWindow) { }
  123.     
  124. };
  125.  
  126. class PASCALIMPLEMENTATION TPTImageComboItem : public System::TObject 
  127. {
  128.     typedef System::TObject inherited;
  129.     
  130. protected:
  131.     TPTCustomImageCombo* mOwner;
  132.     int mItemIndex;
  133.     int mIndex;
  134.     int mIndent;
  135.     int mImageIndex;
  136.     int mOverlayIndex;
  137.     System::AnsiString mCaption;
  138.     int mTag;
  139.     void *mData;
  140.     void __fastcall SetIndent(int aValue);
  141.     void __fastcall SetImageIndex(int aValue);
  142.     void __fastcall SetCaption(const System::AnsiString aValue);
  143.     void __fastcall SetOverlayIndex(int aValue);
  144.     
  145. public:
  146.     __fastcall TPTImageComboItem(TPTCustomImageCombo* aOwner);
  147.     __fastcall virtual ~TPTImageComboItem(void);
  148.     __property int Index = {read=mIndex, nodefault};
  149.     __property int Indent = {read=mIndent, write=SetIndent, nodefault};
  150.     __property int ImageIndex = {read=mImageIndex, write=SetImageIndex, nodefault};
  151.     __property int OverlayIndex = {read=mOverlayIndex, write=SetOverlayIndex, nodefault};
  152.     __property System::AnsiString Caption = {read=mCaption, write=SetCaption};
  153.     __property void * Data = {read=mData, write=mData};
  154.     __property int Tag = {read=mTag, write=mTag, nodefault};
  155. };
  156.  
  157. class DELPHICLASS TPTCombobox;
  158. class PASCALIMPLEMENTATION TPTCombobox : public Uptimagecombo::TPTCustomCombobox 
  159. {
  160.     typedef Uptimagecombo::TPTCustomCombobox inherited;
  161.     
  162. __published:
  163.     __property Style ;
  164.     __property Color ;
  165.     __property Ctl3D ;
  166.     __property DragMode ;
  167.     __property DragCursor ;
  168.     __property DropDownCount ;
  169.     __property Enabled ;
  170.     __property Font ;
  171.     __property ItemHeight ;
  172.     __property Items ;
  173.     __property MaxLength ;
  174.     __property ParentColor ;
  175.     __property ParentCtl3D ;
  176.     __property ParentFont ;
  177.     __property ParentShowHint ;
  178.     __property PopupMenu ;
  179.     __property ShowHint ;
  180.     __property Sorted ;
  181.     __property TabOrder ;
  182.     __property TabStop ;
  183.     __property Text ;
  184.     __property Visible ;
  185.     __property OnChange ;
  186.     __property OnClick ;
  187.     __property OnDblClick ;
  188.     __property OnDragDrop ;
  189.     __property OnDragOver ;
  190.     __property OnDrawItem ;
  191.     __property OnDropDown ;
  192.     __property OnEndDrag ;
  193.     __property OnEnter ;
  194.     __property OnExit ;
  195.     __property OnKeyDown ;
  196.     __property OnKeyPress ;
  197.     __property OnKeyUp ;
  198.     __property OnMeasureItem ;
  199.     __property OnStartDrag ;
  200.     __property OnDeleteItem ;
  201.     __property OnCloseUp ;
  202.     __property OnSelEndCancel ;
  203.     __property OnSelEndOk ;
  204. public:
  205.     /* TCustomComboBox.Create */ __fastcall virtual TPTCombobox(Classes::TComponent* AOwner) : Uptimagecombo::
  206.         TPTCustomCombobox(AOwner) { }
  207.     /* TCustomComboBox.Destroy */ __fastcall virtual ~TPTCombobox(void) { }
  208.     
  209. public:
  210.     /* TWinControl.CreateParented */ __fastcall TPTCombobox(HWND ParentWindow) : Uptimagecombo::TPTCustomCombobox(
  211.         ParentWindow) { }
  212.     
  213. };
  214.  
  215. class DELPHICLASS TPTImageCombo;
  216. class PASCALIMPLEMENTATION TPTImageCombo : public Uptimagecombo::TPTCustomImageCombo 
  217. {
  218.     typedef Uptimagecombo::TPTCustomImageCombo inherited;
  219.     
  220. __published:
  221.     __property AutoSizeHeight ;
  222.     __property IndentPixels ;
  223.     __property ImageList ;
  224.     __property OnDeleteItem ;
  225.     __property OnCloseUp ;
  226.     __property OnSelEndCancel ;
  227.     __property OnSelEndOk ;
  228.     __property OnGetItemData ;
  229.     __property Color ;
  230.     __property Ctl3D ;
  231.     __property DragMode ;
  232.     __property DragCursor ;
  233.     __property DropDownCount ;
  234.     __property Enabled ;
  235.     __property Font ;
  236.     __property ItemHeight ;
  237.     __property MaxLength ;
  238.     __property ParentColor ;
  239.     __property ParentCtl3D ;
  240.     __property ParentFont ;
  241.     __property ParentShowHint ;
  242.     __property PopupMenu ;
  243.     __property ShowHint ;
  244.     __property Sorted ;
  245.     __property TabOrder ;
  246.     __property TabStop ;
  247.     __property Visible ;
  248.     __property OnChange ;
  249.     __property OnClick ;
  250.     __property OnDblClick ;
  251.     __property OnDragDrop ;
  252.     __property OnDragOver ;
  253.     __property OnDrawItem ;
  254.     __property OnDropDown ;
  255.     __property OnEndDrag ;
  256.     __property OnEnter ;
  257.     __property OnExit ;
  258.     __property OnKeyDown ;
  259.     __property OnKeyPress ;
  260.     __property OnKeyUp ;
  261.     __property OnMeasureItem ;
  262.     __property OnStartDrag ;
  263. public:
  264.     /* TPTCustomImageCombo.Create */ __fastcall virtual TPTImageCombo(Classes::TComponent* aOwner) : Uptimagecombo::
  265.         TPTCustomImageCombo(aOwner) { }
  266.     /* TPTCustomImageCombo.Destroy */ __fastcall virtual ~TPTImageCombo(void) { }
  267.     
  268. public:
  269.     /* TWinControl.CreateParented */ __fastcall TPTImageCombo(HWND ParentWindow) : Uptimagecombo::TPTCustomImageCombo(
  270.         ParentWindow) { }
  271.     
  272. };
  273.  
  274. //-- var, const, procedure ---------------------------------------------------
  275.  
  276. }    /* namespace Uptimagecombo */
  277. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  278. using namespace Uptimagecombo;
  279. #endif
  280. //-- end unit ----------------------------------------------------------------
  281. #endif    // UPTImageCombo
  282.